package com.lotter.common.enumobject;


/**
 * @ClassName: UserAccountStatusEunm 
 * @Description: 随机生成样式
 * @author zhangzechi
 * @date 2016年7月27日 下午3:24:33  
 * @version V1.0
 */
public enum RandomTypeEunm {

	NUMBER(1, "纯数字"), LETTER(2, "纯字母"),ALL(3, "数字字母");

	private int code;
	private String desc;

	private RandomTypeEunm(int code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public int getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}
	
	public static RandomTypeEunm getBorrowType (int code) {
		for(RandomTypeEunm type : RandomTypeEunm.values()){
			if(type.getCode() == code){
				return type;
			}
		}
		return null;
	}

	public static String getName(int i){
		for (RandomTypeEunm borrowTypes : values()) {
			if(borrowTypes.getCode()==i){
				return borrowTypes.getDesc();
			}
		}
		return null;
	}
}
